package pishen;

public class Node {
	private String id;
	private NodeInfo info;
	
	public Node(String id){
		this.id = id;
	}

	@Override
	public boolean equals(Object obj) {
		return id.equals(((Node)obj).getId());
	}

	@Override
	public int hashCode() {
		return id.hashCode();
	}

	public String getId(){
		return id;
	}
	
	public void appendNodeInfo(NodeInfo info){
		this.info = info;
	}
	
	public void cleanNodeInfo(){
		info = null;
	}
	
	public NodeInfo getNodeInfo(){
		return info;
	}
	
	@Override
	public String toString() {
		return id;
	}
	
}
